<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>酒店前台管理</title>
<?php
header ( 'Content-type: text/html; charset=utf-8' );
?>
<?php
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";
$conn = mysqli_connect ( $mysql_server_name, $mysql_username, $mysql_password );
mysqli_query ( $conn, "set names 'utf-8'" );
$sql = "select * from room  ORDER BY room_id ASC";
// require_once('page.php');
// page($sql,'room.php',"5");//这几句是分页的句子！！
// $sql = " SELECT * FROM room ORDER BY room_id DESC limit".$begincount.",".$rows;
mysqli_select_db ( $conn, $mysql_database );
$result = mysqli_query ( $conn, $sql );
?>
</head>
<body>
	<table width="778" border="0" align="center" cellpadding="0"
		cellspacing="0">
		<tr>
			<td height="30">
				<table width="778" border="0" cellspacing="0"
					cellpadding="0">
					<tr>
						<td height="24" bgcolor="#6699ff">
							<table width="770" border="0"
								cellspacing="0" cellpadding="0">
								<tr>
									<td bordercolor="#0072FF">
										<table width="770" border="0"
											cellspacing="0" cellpadding="0">
											<tr>
												<td width="6%" height="19" valign="bottom">
													<div
														align="center">
													</div>
												</td>
												<td width="94%" valign="bottom">
													<span class="STYLE1">房间信息</span>
												</td>
											</tr>
										</table>
									</td>
									<td>
										<div align="right">
											<span class="STYLE1">&nbsp;</span>
											<span class="STYLE1">&nbsp;</span>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<form name="form" method="post" onsubmit="return check();"
			action="roomchaxun.php">
			<tr>
				<td colspan="6" bgcolor="#FFFFFF">请输入要查找的房间的房间编号：
					<input
					name="room_id" type="text" /> 
					<label> 
						<input type="submit" name="Submit" value="进行搜索" />
					</label>
				</td>
			</tr>
		</form>
		<tr>
			<td bordercolor="#FFFFFF">
				<table width="770" border="0"
					cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
					<tr>
						<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div
								align="center">
								<span class="STYLE10">房间编号</span>
							</div>
						</td>
						<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div
								align="center">
								<span class="STYLE10">房间类型</span>
							</div>
						</td>
						<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div
								align="center">
								<span class="STYLE10">房间状态</span>
							</div>
						</td>
						<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div
								align="center">
								<span class="STYLE10">房间面积</span>
							</div>
						</td>
						<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div
								align="center">
								<span class="STYLE10">房间价格</span>
							</div>
						</td>
						<td width="30%" height="20" bgcolor="d3eaef" class="STYLE6"><div
								align="center">
								<span class="STYLE10">描述</span>
							</div>
						</td>
						<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6">
							<div
									align="center">
									<span class="STYLE10">操作</span>
							</div>
						</td>
					</tr>
	  				<?php
					while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) {
					?>
					<tr>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['room_id'];?>
      						</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['room_type'];?>
      						</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center">
        					<?php echo $row['room_status'];?>
      						</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['room_area'];?>
      						</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['room_cost'];?>
      						</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center"><?php echo $row['description'];?>
          					</div>
						</td>
						<td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<div align="center">
								<a href="allroomupdate.php?id=<?php echo $row['room_id'];?>">修改</a>&nbsp;
								<a href="room_delete.php?id=<?php echo $row['room_id'];?>">删除</a>
							</div>
						</td>
					</tr>
					  <?php
					  }
					  ?>
    			</table>
    		</td>
		</tr>
	</table>
</body>
</html>